package com.sujeet.euler;

public class Prob2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int a = 1;
		int b = 2;
		int sum = b;
		int temp = 0;
		while(b<=4000000) {
			temp = b;
			b = a + b;
			System.out.println(b);
			a = temp;
			
			if (b % 2 == 0) {
				sum = sum + b;
			}
		}
		
		System.out.println(sum);
	}

}
